\hypertarget{engine__terrain_8cpp}{\section{E\-:/!代码工厂/3\-D引擎/engine\-\_\-terrain.cpp 文件参考}
\label{engine__terrain_8cpp}\index{E\-:/!代码工厂/3\-D引擎/engine\-\_\-terrain.\-cpp@{E\-:/!代码工厂/3\-D引擎/engine\-\_\-terrain.\-cpp}}
}
{\ttfamily \#include \char`\"{}engine\-\_\-terrain.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}c\-Camera\-V1.\-h\char`\"{}}\\*
\subsection*{函数}
\begin{DoxyCompactItemize}
\item 
U\-I\-N\-T $\ast$ \hyperlink{engine__terrain_8cpp_afc9ddf20c03df6b92ae1a49a4cfc495a}{init\-\_\-terrain} (I\-Direct3\-D\-Device9 $\ast$p\-Device, char $\ast$file\-\_\-name, \hyperlink{struct_terrain}{Terrain} \&terrain\-\_\-map, I\-Direct3\-D\-Index\-Buffer9 $\ast$$\ast$vertex\-Index\-Buff, I\-Direct3\-D\-Vertex\-Buffer9 $\ast$$\ast$vertex\-Buff, I\-Direct3\-D\-Texture9 $\ast$$\ast$tex)
\item 
U\-C\-H\-A\-R $\ast$ \hyperlink{engine__terrain_8cpp_a5db2a6b0ae48e0a00b151b3983b835fe}{terrain\-\_\-read\-\_\-heightmap} (T\-C\-H\-A\-R $\ast$file\-\_\-name, int num\-\_\-terrain\-\_\-vertex)
\item 
int \hyperlink{engine__terrain_8cpp_aae6e4d934c4e6a30b9d97886a6f50493}{terrain\-\_\-get\-\_\-heightmap\-\_\-value} (\hyperlink{struct_terrain}{Terrain} \&map1, U\-I\-N\-T $\ast$heightmap, int i, int j)
\item 
void \hyperlink{engine__terrain_8cpp_a40631fd52bc2d6307b0b6979c67a4f1c}{terrain\-\_\-set\-\_\-heightmap\-\_\-value} (\hyperlink{struct_terrain}{Terrain} \&map1, U\-I\-N\-T $\ast$heightmap, int i, int j, int value)
\item 
float \hyperlink{engine__terrain_8cpp_ae85707fd64bc55da7d360da8f064b917}{terrain\-\_\-compute\-\_\-vertex\-\_\-light} (\hyperlink{struct_terrain}{Terrain} \&map1, U\-I\-N\-T $\ast$heightmap, int i, int j, D3\-D\-X\-V\-E\-C\-T\-O\-R3 direction\-\_\-light)
\item 
void \hyperlink{engine__terrain_8cpp_ab8831f27840e3220072c58a86c090f3b}{terrain\-\_\-init\-\_\-vertex\-\_\-index} (I\-Direct3\-D\-Device9 $\ast$p\-Device, I\-Direct3\-D\-Index\-Buffer9 $\ast$$\ast$ib, \hyperlink{struct_terrain}{Terrain} \&map1)
\item 
float \hyperlink{engine__terrain_8cpp_a99884d8768968f955132f819840f1d65}{terrain\-\_\-get\-\_\-height} (\hyperlink{struct_terrain}{Terrain} \&map1, U\-I\-N\-T $\ast$heightmap, float x, float z)
\end{DoxyCompactItemize}


\subsection{函数说明}
\hypertarget{engine__terrain_8cpp_afc9ddf20c03df6b92ae1a49a4cfc495a}{\index{engine\-\_\-terrain.\-cpp@{engine\-\_\-terrain.\-cpp}!init\-\_\-terrain@{init\-\_\-terrain}}
\index{init\-\_\-terrain@{init\-\_\-terrain}!engine_terrain.cpp@{engine\-\_\-terrain.\-cpp}}
\subsubsection[{init\-\_\-terrain}]{\setlength{\rightskip}{0pt plus 5cm}U\-I\-N\-T$\ast$ init\-\_\-terrain (
\begin{DoxyParamCaption}
\item[{I\-Direct3\-D\-Device9 $\ast$}]{p\-Device, }
\item[{char $\ast$}]{file\-\_\-name, }
\item[{{\bf Terrain} \&}]{terrain\-\_\-map, }
\item[{I\-Direct3\-D\-Index\-Buffer9 $\ast$$\ast$}]{vertex\-Index\-Buff, }
\item[{I\-Direct3\-D\-Vertex\-Buffer9 $\ast$$\ast$}]{vertex\-Buff, }
\item[{I\-Direct3\-D\-Texture9 $\ast$$\ast$}]{tex}
\end{DoxyParamCaption}
)}}\label{engine__terrain_8cpp_afc9ddf20c03df6b92ae1a49a4cfc495a}
\hypertarget{engine__terrain_8cpp_ae85707fd64bc55da7d360da8f064b917}{\index{engine\-\_\-terrain.\-cpp@{engine\-\_\-terrain.\-cpp}!terrain\-\_\-compute\-\_\-vertex\-\_\-light@{terrain\-\_\-compute\-\_\-vertex\-\_\-light}}
\index{terrain\-\_\-compute\-\_\-vertex\-\_\-light@{terrain\-\_\-compute\-\_\-vertex\-\_\-light}!engine_terrain.cpp@{engine\-\_\-terrain.\-cpp}}
\subsubsection[{terrain\-\_\-compute\-\_\-vertex\-\_\-light}]{\setlength{\rightskip}{0pt plus 5cm}float terrain\-\_\-compute\-\_\-vertex\-\_\-light (
\begin{DoxyParamCaption}
\item[{{\bf Terrain} \&}]{map1, }
\item[{U\-I\-N\-T $\ast$}]{heightmap, }
\item[{int}]{i, }
\item[{int}]{j, }
\item[{D3\-D\-X\-V\-E\-C\-T\-O\-R3}]{direction\-\_\-light}
\end{DoxyParamCaption}
)}}\label{engine__terrain_8cpp_ae85707fd64bc55da7d360da8f064b917}
\hypertarget{engine__terrain_8cpp_a99884d8768968f955132f819840f1d65}{\index{engine\-\_\-terrain.\-cpp@{engine\-\_\-terrain.\-cpp}!terrain\-\_\-get\-\_\-height@{terrain\-\_\-get\-\_\-height}}
\index{terrain\-\_\-get\-\_\-height@{terrain\-\_\-get\-\_\-height}!engine_terrain.cpp@{engine\-\_\-terrain.\-cpp}}
\subsubsection[{terrain\-\_\-get\-\_\-height}]{\setlength{\rightskip}{0pt plus 5cm}float terrain\-\_\-get\-\_\-height (
\begin{DoxyParamCaption}
\item[{{\bf Terrain} \&}]{map1, }
\item[{U\-I\-N\-T $\ast$}]{heightmap, }
\item[{float}]{x, }
\item[{float}]{z}
\end{DoxyParamCaption}
)}}\label{engine__terrain_8cpp_a99884d8768968f955132f819840f1d65}
\hypertarget{engine__terrain_8cpp_aae6e4d934c4e6a30b9d97886a6f50493}{\index{engine\-\_\-terrain.\-cpp@{engine\-\_\-terrain.\-cpp}!terrain\-\_\-get\-\_\-heightmap\-\_\-value@{terrain\-\_\-get\-\_\-heightmap\-\_\-value}}
\index{terrain\-\_\-get\-\_\-heightmap\-\_\-value@{terrain\-\_\-get\-\_\-heightmap\-\_\-value}!engine_terrain.cpp@{engine\-\_\-terrain.\-cpp}}
\subsubsection[{terrain\-\_\-get\-\_\-heightmap\-\_\-value}]{\setlength{\rightskip}{0pt plus 5cm}int terrain\-\_\-get\-\_\-heightmap\-\_\-value (
\begin{DoxyParamCaption}
\item[{{\bf Terrain} \&}]{map1, }
\item[{U\-I\-N\-T $\ast$}]{heightmap, }
\item[{int}]{i, }
\item[{int}]{j}
\end{DoxyParamCaption}
)}}\label{engine__terrain_8cpp_aae6e4d934c4e6a30b9d97886a6f50493}
\hypertarget{engine__terrain_8cpp_ab8831f27840e3220072c58a86c090f3b}{\index{engine\-\_\-terrain.\-cpp@{engine\-\_\-terrain.\-cpp}!terrain\-\_\-init\-\_\-vertex\-\_\-index@{terrain\-\_\-init\-\_\-vertex\-\_\-index}}
\index{terrain\-\_\-init\-\_\-vertex\-\_\-index@{terrain\-\_\-init\-\_\-vertex\-\_\-index}!engine_terrain.cpp@{engine\-\_\-terrain.\-cpp}}
\subsubsection[{terrain\-\_\-init\-\_\-vertex\-\_\-index}]{\setlength{\rightskip}{0pt plus 5cm}void terrain\-\_\-init\-\_\-vertex\-\_\-index (
\begin{DoxyParamCaption}
\item[{I\-Direct3\-D\-Device9 $\ast$}]{p\-Device, }
\item[{I\-Direct3\-D\-Index\-Buffer9 $\ast$$\ast$}]{ib, }
\item[{{\bf Terrain} \&}]{map1}
\end{DoxyParamCaption}
)}}\label{engine__terrain_8cpp_ab8831f27840e3220072c58a86c090f3b}
\hypertarget{engine__terrain_8cpp_a5db2a6b0ae48e0a00b151b3983b835fe}{\index{engine\-\_\-terrain.\-cpp@{engine\-\_\-terrain.\-cpp}!terrain\-\_\-read\-\_\-heightmap@{terrain\-\_\-read\-\_\-heightmap}}
\index{terrain\-\_\-read\-\_\-heightmap@{terrain\-\_\-read\-\_\-heightmap}!engine_terrain.cpp@{engine\-\_\-terrain.\-cpp}}
\subsubsection[{terrain\-\_\-read\-\_\-heightmap}]{\setlength{\rightskip}{0pt plus 5cm}U\-C\-H\-A\-R$\ast$ terrain\-\_\-read\-\_\-heightmap (
\begin{DoxyParamCaption}
\item[{T\-C\-H\-A\-R $\ast$}]{file\-\_\-name, }
\item[{int}]{num\-\_\-terrain\-\_\-vertex}
\end{DoxyParamCaption}
)}}\label{engine__terrain_8cpp_a5db2a6b0ae48e0a00b151b3983b835fe}
\hypertarget{engine__terrain_8cpp_a40631fd52bc2d6307b0b6979c67a4f1c}{\index{engine\-\_\-terrain.\-cpp@{engine\-\_\-terrain.\-cpp}!terrain\-\_\-set\-\_\-heightmap\-\_\-value@{terrain\-\_\-set\-\_\-heightmap\-\_\-value}}
\index{terrain\-\_\-set\-\_\-heightmap\-\_\-value@{terrain\-\_\-set\-\_\-heightmap\-\_\-value}!engine_terrain.cpp@{engine\-\_\-terrain.\-cpp}}
\subsubsection[{terrain\-\_\-set\-\_\-heightmap\-\_\-value}]{\setlength{\rightskip}{0pt plus 5cm}void terrain\-\_\-set\-\_\-heightmap\-\_\-value (
\begin{DoxyParamCaption}
\item[{{\bf Terrain} \&}]{map1, }
\item[{U\-I\-N\-T $\ast$}]{heightmap, }
\item[{int}]{i, }
\item[{int}]{j, }
\item[{int}]{value}
\end{DoxyParamCaption}
)}}\label{engine__terrain_8cpp_a40631fd52bc2d6307b0b6979c67a4f1c}
